import {ref, reactive, getCurrentInstance, onMounted} from "vue";
import {defineStore} from "pinia";
//export default defineStorei 必须是defineStore
export default defineStore('userStore', () => {
        const userModel = ref({
            uid: -1
        })
        return {
            userModel
        }
    }, {
        persist: {
            storage: sessionStorage,//数据 存入  SessionStorage中
            paths: ['userModel']//把userModel属性 存入SessionStorage中
        }
    }
)